<?php

    if (!class_exists("Config"))        include_once '../config/classes/class.Config.php';
    $cfg = new config();
    
    //if ($_GET['m'] == "cerrar_sesion") session_destroy();
?>
<html>
<head>
    <title>ElectrolinerasOnline.com [admin]</title>         

    <!-- META -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8">

    <!-- CSS -->
    <link rel="stylesheet" type="text/css" media="all" href="<?php echo $cfg->pathCss ?>/main2.css"/>      
    <link href='http://fonts.googleapis.com/css?family=Nunito:300' rel='stylesheet' type='text/css'> <!-- 'Nunito', sans-serif; -->
    <link href='http://fonts.googleapis.com/css?family=Convergence' rel='stylesheet' type='text/css'> <!-- 'Convergence', sans-serif; -->
    <link type="text/css" href="<?php echo $cfg->pathJs ?>/jqueryui/css/custom-theme/jquery-ui-1.8.17.custom.css" rel="stylesheet" />	
<!--    <link type="text/css" href="<?php echo $cfg->pathJs ?>/DropKick/dropkick.css" rel="stylesheet" />	-->
<!--    <link type="text/css" href="<?php echo $cfg->pathJs ?>/DropKick/example/example.css" rel="stylesheet" />	-->
    <link type="text/css" href="<?php echo $cfg->pathCss ?>/ezmark.css" rel="stylesheet" />	
    <link rel="stylesheet" href="<?php echo $cfg->pathJs ?>/fancybox/source/jquery.fancybox.css?v=2.0.5" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php echo $cfg->pathJs ?>/fancybox/source/helpers/jquery.fancybox-buttons.css?v=2.0.5" type="text/css" media="screen" />
    <link rel="stylesheet" href="<?php echo $cfg->pathJs ?>/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=2.0.5" type="text/css" media="screen" />

    <!-- SCRIPTS -->
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/jqueryui/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/jqueryui/js/jquery-ui-1.8.17.custom.min.js"></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/common.js"></script>
<!--    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/DropKick/jquery.dropkick-1.0.0.js"></script>-->
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/jquery.ezmark.min.js"></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/fancybox/source/jquery.fancybox.pack.js?v=2.0.5"></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"/></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/fancybox/source/helpers/jquery.fancybox-buttons.js?v=2.0.5"></script>
    <script type="text/javascript" src="<?php echo $cfg->pathJs ?>/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=2.0.5"></script>
        
    
    <script>
        $(document).ready( $("#btn_login").button() );
        
        function checkLoginAdmin() {
            var mail = $("#mail").val();
            var pass = $("#password").val();
            
            if (mail == "" || pass == "") {
                alert("Los campos no pueden estar vacios");
                return 0;
            }
            
            $("form[name=login_form]").submit();
        }
    </script>
        
</head>


<body>
    <div id="contenedor" class="container">

            <?php
                include $cfg->pathBackEnd."/header_sinlinks.php";
                //include "menu.php";
            ?>

        <div id="cuerpo" class="clear">
            
             <div id="login_admin">
                 
                        <h2>Iniciar sesion</h2>
                        
                        <?php if ($_GET['m'] == "error") { ?>
                                <script>
                                        var text = "Ehh, vas de listo? Vuelve a introducir los datos";
                                        document.write(getMessage(text,"","error"));
                                </script>
                        <?php } ?>
                        
                        
                        
                        <form name="login_form" method="POST" action="<?php echo $cfg->pathConfig.'/sesion.php?m=iniciar_admin' ?>">
                                
                            <table id="add_user_simple" class="borded-table" border="0" align="center">
                                    <tr>
                                        <td style="text-align:left">
                                            Mail<br>
                                            <input name="mail" id="mail" type="text" maxlength="50" value="djmasakre@gmail.com"/>
                                        </td> 
                                    </tr> 
                                    <tr>
                                        <td  style="text-align:left">
                                            Password<br>
                                            <input name="password" id="password" type="password" maxlength="50" value="thund3rfuck"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <input type="button" value="Inicia" id="btn_login" class="ui-button" onClick="checkLoginAdmin()"/>
                                        </td>
                                    </tr>
                                </table>
                        </form>    
                </div>
            

        </div>
        
   

    </div>
</body>
</html>


